import bus from '@/bus'
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  options: {
    orderStatus: [{
      value: 1,
      label: '上门充气'
    }, {
      value: 2,
      label: '上门搭电'
    }]
  },
  columns: [{
    title: '序号',
    type: 'index',
    align: 'left',
    width: 50
  }, {
    title: '溢价策略名称',
    key: 'name',
    align: 'left'
  }, {
    title: '创建时间',
    key: 'createDate',
    align: 'left'
  }, {
    title: '状态',
    align: 'left',
    render: (h, params) => {
      return h('div', [
        h('i-switch', {
          props: {
            type: 'primary',
            value: params.row.isEnabled
          },
          on: {
            'on-change': (value) => {
              bus.$emit('onSwitch', params.row.id, value, params.index)
            }
          }
        })
      ])
    }
  }, {
    title: '操作',
    align: 'left',
    render: (h, params) => {
      return h('div', [
        h('Button', {
          props: {
            size: 'small',
            type: 'primary'
          },
          class: 'mr',
          on: {
            click: () => {
              bus.$emit('onEdit', { id: params.row.id })
            }
          }
        }, '编辑'),
        h('Button', {
          props: {
            size: 'small'
          },
          on: {
            click: () => {
              bus.$emit('onDelete', { id: params.row.id, index: params.index })
            }
          }
        }, '删除')
      ])
    }
  }],
  data: []
}
export default data